home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
macros
/
latex209
/
contrib
/
songbook
/
conditionals.sty
< prev
next >
Wrap
Text File
|
1994-01-22
|
662b
|
15 lines
%============Conditionals by Donald Arseneau==========================
% (as of 27 July'92)
% \if\blank --- checks if parameter is blank (Spaces count as blank)
% \if\given --- checks if parameter is not blank: like \ifblank\else
% \if\naught --- checks if parameter is null (spaces are NOT null)
{\catcode`\!=8 % funny catcode so ! will be a delimiter
%
\long\gdef\given#1{\fi\Ifbl@nk#1@@@\empty!}
\long\gdef\blank#1{\fi\Ifbl@nk#1@@..!}% if null or spaces
\long\gdef\naught#1{\IfN@Ught#1* {#1}!}% if null
\long\gdef\Ifbl@nk#1#2@#3#4!{\ifx#3#4}
\long\gdef\IfN@Ught#1 #2!{\blank{#2}}
}
%=====================================================================